/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.edu.kamai.logic.facade;

import com.edu.kamai.persistence.beans.Contest;
import com.edu.kamai.persistence.dao.ContestDao;
import java.util.List;

/**
 *
 * @author xyzhu
 */
public class ContestFacade {
    public static int addContest(Contest contestBean) {
        ContestDao contestdao = new ContestDao();
        contestdao.addContest(contestBean);
        return 1;
    }
    
    public static List<Contest> findContest(){
        ContestDao contestdao = new ContestDao();
        return contestdao.findContest();
    }
    
    public static Contest findContestByID(int cid){
        ContestDao contestdao = new ContestDao();
        return contestdao.findContestByID(cid);
    }
    
}
